#pragma once

#include <Windows.h>
#pragma comment(lib, "winmm.lib ")
#include <string>

class TFun
{
	DWORD t1;
	DWORD t2;
	std::string name;
public:
	TFun(const std::string s)
	{
		t1 = t2 = 0;
		t1 = timeGetTime();
		name = s;
	}
	~TFun()
	{
		t2 = timeGetTime();
		printf("%s used time %u ms \n", name.c_str(), t2 - t1);
	}
};